package com.example.tasks;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

@Configuration
public class PrintTask {
    /**
     * 每3秒运行一次
     */
    @Scheduled(cron = "0/3 * * * * ?")
    void print(){
        System.out.println("hello,word");
    }
}
